home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / SunLabs / tclTK / src / tcl7.4p3.patch < prev    next >
Text File  |  1995-11-27  |  16KB  |  570 lines

  1. Prereq: "7.4p2"
  2. *** ../tcl7.4p2/patchlevel.h    Mon Sep 18 11:41:25 1995
  3. --- patchlevel.h    Mon Nov 27 08:57:48 1995
  4. ***************
  5. *** 17,23 ****
  6.    * See the file "license.terms" for information on usage and redistribution
  7.    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  8.    *
  9. !  * @(#) patchlevel.h 1.11 95/09/18 11:41:22
  10.    */
  11.   
  12. ! #define TCL_PATCH_LEVEL "7.4p2"
  13. --- 17,23 ----
  14.    * See the file "license.terms" for information on usage and redistribution
  15.    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  16.    *
  17. !  * @(#) patchlevel.h 1.12 95/11/27 08:57:52
  18.    */
  19.   
  20. ! #define TCL_PATCH_LEVEL "7.4p3"
  21. *** ../tcl7.4p2/./tclCkalloc.c    Mon Jun 19 10:33:12 1995
  22. --- ./tclCkalloc.c    Wed Sep 20 16:43:25 1995
  23. ***************
  24. *** 14,20 ****
  25.    *
  26.    */
  27.   
  28. ! static char sccsid[] = "@(#) tclCkalloc.c 1.9 95/06/19 10:33:11";
  29.   
  30.   #include "tclInt.h"
  31.   
  32. --- 14,20 ----
  33.    *
  34.    */
  35.   
  36. ! static char sccsid[] = "@(#) tclCkalloc.c 1.10 95/09/20 16:43:24";
  37.   
  38.   #include "tclInt.h"
  39.   
  40. ***************
  41. *** 393,399 ****
  42.        * even though BODY_OFFSET is in words on these machines).
  43.        */
  44.   
  45. !     struct mem_header *memp = (struct mem_header *) \
  46.           (((unsigned long) ptr) - BODY_OFFSET);
  47.   
  48.       if (alloc_tracing)
  49. --- 393,399 ----
  50.        * even though BODY_OFFSET is in words on these machines).
  51.        */
  52.   
  53. !     struct mem_header *memp = (struct mem_header *)
  54.           (((unsigned long) ptr) - BODY_OFFSET);
  55.   
  56.       if (alloc_tracing)
  57. ***************
  58. *** 459,465 ****
  59.        * line.
  60.        */
  61.   
  62. !     struct mem_header *memp = (struct mem_header *) \
  63.           (((unsigned long) ptr) - BODY_OFFSET);
  64.   
  65.       copySize = size;
  66. --- 459,465 ----
  67.        * line.
  68.        */
  69.   
  70. !     struct mem_header *memp = (struct mem_header *)
  71.           (((unsigned long) ptr) - BODY_OFFSET);
  72.   
  73.       copySize = size;
  74. *** ../tcl7.4p2/./tclCmdAH.c    Fri May  5 09:29:51 1995
  75. --- ./tclCmdAH.c    Wed Sep 27 11:11:26 1995
  76. ***************
  77. *** 12,18 ****
  78.    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  79.    */
  80.   
  81. ! static char sccsid[] = "@(#) tclCmdAH.c 1.98 95/05/05 09:29:51";
  82.   
  83.   #include "tclInt.h"
  84.   #include "tclPort.h"
  85. --- 12,18 ----
  86.    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  87.    */
  88.   
  89. ! static char sccsid[] = "@(#) tclCmdAH.c 1.99 95/09/27 11:11:24";
  90.   
  91.   #include "tclInt.h"
  92.   #include "tclPort.h"
  93. ***************
  94. *** 775,780 ****
  95. --- 775,791 ----
  96.           }
  97.           argIndex++;
  98.           format++;
  99. +     }
  100. +     if (width > 1000) {
  101. +         /*
  102. +          * Don't allow arbitrarily large widths:  could cause core
  103. +          * dump when we try to allocate a zillion bytes of memory
  104. +          * below.
  105. +          */
  106. +         width = 1000;
  107. +     } else if (width < 0) {
  108. +         width = 0;
  109.       }
  110.       if (width != 0) {
  111.           sprintf(newPtr, "%d", width);
  112. *** ../tcl7.4p2/./tclMain.c    Thu Jun  8 10:55:57 1995
  113. --- ./tclMain.c    Wed Sep 27 15:32:02 1995
  114. ***************
  115. *** 11,17 ****
  116.    */
  117.   
  118.   #ifndef lint
  119. ! static char sccsid[] = "@(#) tclMain.c 1.21 95/06/08 10:55:55";
  120.   #endif
  121.   
  122.   #include <stdio.h>
  123. --- 11,17 ----
  124.    */
  125.   
  126.   #ifndef lint
  127. ! static char sccsid[] = "@(#) tclMain.c 1.22 95/09/27 15:32:01";
  128.   #endif
  129.   
  130.   #include <stdio.h>
  131. ***************
  132. *** 230,236 ****
  133.       if (code != TCL_OK) {
  134.           fprintf(stderr, "%s\n", interp->result);
  135.       } else if (tty && (*interp->result != 0)) {
  136. !         printf("%s\n", interp->result);
  137.       }
  138.   #ifdef TCL_MEM_DEBUG
  139.       if (quitFlag) {
  140. --- 230,242 ----
  141.       if (code != TCL_OK) {
  142.           fprintf(stderr, "%s\n", interp->result);
  143.       } else if (tty && (*interp->result != 0)) {
  144. !         /*
  145. !          * Important:  use puts and not printf here.  On Solaris 2.3
  146. !          * and 2.4, and perhaps other systems, printf will dump core
  147. !          * if interp->result is big.
  148. !          */
  149. !         puts(interp->result);
  150.       }
  151.   #ifdef TCL_MEM_DEBUG
  152.       if (quitFlag) {
  153. *** ../tcl7.4p2/./tclUnixAZ.c    Thu Jun 29 14:22:40 1995
  154. --- ./tclUnixAZ.c    Fri Nov 17 15:40:14 1995
  155. ***************
  156. *** 14,20 ****
  157.    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  158.    */
  159.   
  160. ! static char sccsid[] = "@(#) tclUnixAZ.c 1.85 95/06/29 14:22:37";
  161.   
  162.   #include "tclInt.h"
  163.   #include "tclPort.h"
  164. --- 14,20 ----
  165.    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  166.    */
  167.   
  168. ! static char sccsid[] = "@(#) tclUnixAZ.c 1.87 95/11/17 15:40:14";
  169.   
  170.   #include "tclInt.h"
  171.   #include "tclPort.h"
  172. ***************
  173. *** 783,804 ****
  174.   {
  175.       char string[30];
  176.   
  177. !     sprintf(string, "%ld", statPtr->st_dev);
  178.       if (Tcl_SetVar2(interp, varName, "dev", string, TCL_LEAVE_ERR_MSG)
  179.           == NULL) {
  180.       return TCL_ERROR;
  181.       }
  182. !     sprintf(string, "%ld", statPtr->st_ino);
  183.       if (Tcl_SetVar2(interp, varName, "ino", string, TCL_LEAVE_ERR_MSG)
  184.           == NULL) {
  185.       return TCL_ERROR;
  186.       }
  187. !     sprintf(string, "%ld", statPtr->st_mode);
  188.       if (Tcl_SetVar2(interp, varName, "mode", string, TCL_LEAVE_ERR_MSG)
  189.           == NULL) {
  190.       return TCL_ERROR;
  191.       }
  192. !     sprintf(string, "%ld", statPtr->st_nlink);
  193.       if (Tcl_SetVar2(interp, varName, "nlink", string, TCL_LEAVE_ERR_MSG)
  194.           == NULL) {
  195.       return TCL_ERROR;
  196. --- 783,804 ----
  197.   {
  198.       char string[30];
  199.   
  200. !     sprintf(string, "%ld", (long) statPtr->st_dev);
  201.       if (Tcl_SetVar2(interp, varName, "dev", string, TCL_LEAVE_ERR_MSG)
  202.           == NULL) {
  203.       return TCL_ERROR;
  204.       }
  205. !     sprintf(string, "%ld", (long) statPtr->st_ino);
  206.       if (Tcl_SetVar2(interp, varName, "ino", string, TCL_LEAVE_ERR_MSG)
  207.           == NULL) {
  208.       return TCL_ERROR;
  209.       }
  210. !     sprintf(string, "%ld", (long) statPtr->st_mode);
  211.       if (Tcl_SetVar2(interp, varName, "mode", string, TCL_LEAVE_ERR_MSG)
  212.           == NULL) {
  213.       return TCL_ERROR;
  214.       }
  215. !     sprintf(string, "%ld", (long) statPtr->st_nlink);
  216.       if (Tcl_SetVar2(interp, varName, "nlink", string, TCL_LEAVE_ERR_MSG)
  217.           == NULL) {
  218.       return TCL_ERROR;
  219. ***************
  220. *** 813,834 ****
  221.           == NULL) {
  222.       return TCL_ERROR;
  223.       }
  224. !     sprintf(string, "%ld", statPtr->st_size);
  225.       if (Tcl_SetVar2(interp, varName, "size", string, TCL_LEAVE_ERR_MSG)
  226.           == NULL) {
  227.       return TCL_ERROR;
  228.       }
  229. !     sprintf(string, "%ld", statPtr->st_atime);
  230.       if (Tcl_SetVar2(interp, varName, "atime", string, TCL_LEAVE_ERR_MSG)
  231.           == NULL) {
  232.       return TCL_ERROR;
  233.       }
  234. !     sprintf(string, "%ld", statPtr->st_mtime);
  235.       if (Tcl_SetVar2(interp, varName, "mtime", string, TCL_LEAVE_ERR_MSG)
  236.           == NULL) {
  237.       return TCL_ERROR;
  238.       }
  239. !     sprintf(string, "%ld", statPtr->st_ctime);
  240.       if (Tcl_SetVar2(interp, varName, "ctime", string, TCL_LEAVE_ERR_MSG)
  241.           == NULL) {
  242.       return TCL_ERROR;
  243. --- 813,834 ----
  244.           == NULL) {
  245.       return TCL_ERROR;
  246.       }
  247. !     sprintf(string, "%ld", (long) statPtr->st_size);
  248.       if (Tcl_SetVar2(interp, varName, "size", string, TCL_LEAVE_ERR_MSG)
  249.           == NULL) {
  250.       return TCL_ERROR;
  251.       }
  252. !     sprintf(string, "%ld", (long) statPtr->st_atime);
  253.       if (Tcl_SetVar2(interp, varName, "atime", string, TCL_LEAVE_ERR_MSG)
  254.           == NULL) {
  255.       return TCL_ERROR;
  256.       }
  257. !     sprintf(string, "%ld", (long) statPtr->st_mtime);
  258.       if (Tcl_SetVar2(interp, varName, "mtime", string, TCL_LEAVE_ERR_MSG)
  259.           == NULL) {
  260.       return TCL_ERROR;
  261.       }
  262. !     sprintf(string, "%ld", (long) statPtr->st_ctime);
  263.       if (Tcl_SetVar2(interp, varName, "ctime", string, TCL_LEAVE_ERR_MSG)
  264.           == NULL) {
  265.       return TCL_ERROR;
  266. ***************
  267. *** 1806,1812 ****
  268.   {
  269.       int count, i, result;
  270.       double timePer;
  271. ! #if NO_GETTOD
  272.       struct tms dummy2;
  273.       long start, stop;
  274.   #else
  275. --- 1806,1812 ----
  276.   {
  277.       int count, i, result;
  278.       double timePer;
  279. ! #ifdef NO_GETTOD
  280.       struct tms dummy2;
  281.       long start, stop;
  282.   #else
  283. ***************
  284. *** 1826,1832 ****
  285.           " command ?count?\"", (char *) NULL);
  286.       return TCL_ERROR;
  287.       }
  288. ! #if NO_GETTOD
  289.       start = times(&dummy2);
  290.   #else
  291.       gettimeofday(&start, &tz);
  292. --- 1826,1832 ----
  293.           " command ?count?\"", (char *) NULL);
  294.       return TCL_ERROR;
  295.       }
  296. ! #ifdef NO_GETTOD
  297.       start = times(&dummy2);
  298.   #else
  299.       gettimeofday(&start, &tz);
  300. ***************
  301. *** 1843,1849 ****
  302.           return result;
  303.       }
  304.       }
  305. ! #if NO_GETTOD
  306.       stop = times(&dummy2);
  307.       timePer = (((double) (stop - start))*1000000.0)/CLK_TCK;
  308.   #else
  309. --- 1843,1849 ----
  310.           return result;
  311.       }
  312.       }
  313. ! #ifdef NO_GETTOD
  314.       stop = times(&dummy2);
  315.       timePer = (((double) (stop - start))*1000000.0)/CLK_TCK;
  316.   #else
  317. ***************
  318. *** 1892,1898 ****
  319.                    * newline. */
  320.   {
  321.       int result = TCL_OK;
  322. !     int i, pid, length, abnormalExit;
  323.       WAIT_STATUS_TYPE waitStatus;
  324.       char *msg;
  325.   
  326. --- 1892,1898 ----
  327.                    * newline. */
  328.   {
  329.       int result = TCL_OK;
  330. !     int i, pid, length, abnormalExit, anyErrorInfo;
  331.       WAIT_STATUS_TYPE waitStatus;
  332.       char *msg;
  333.   
  334. ***************
  335. *** 1964,1969 ****
  336. --- 1964,1970 ----
  337.        * string.
  338.        */
  339.   
  340. +     anyErrorInfo = 0;
  341.       if (errorId >= 0) {
  342.       while (1) {
  343.   #        define BUFFER_SIZE 1000
  344. ***************
  345. *** 1984,1989 ****
  346. --- 1985,1991 ----
  347.           }
  348.           buffer[count] = 0;
  349.           Tcl_AppendResult(interp, buffer, (char *) NULL);
  350. +         anyErrorInfo = 1;
  351.       }
  352.       close(errorId);
  353.       }
  354. ***************
  355. *** 1993,1999 ****
  356.        * at all, generate an error message here.
  357.        */
  358.   
  359. !     if (abnormalExit && (*interp->result == 0)) {
  360.       Tcl_AppendResult(interp, "child process exited abnormally",
  361.           (char *) NULL);
  362.       }
  363. --- 1995,2001 ----
  364.        * at all, generate an error message here.
  365.        */
  366.   
  367. !     if (abnormalExit && !anyErrorInfo) {
  368.       Tcl_AppendResult(interp, "child process exited abnormally",
  369.           (char *) NULL);
  370.       }
  371. *** ../tcl7.4p2/./tclUnixStr.c    Thu Jun 29 08:21:26 1995
  372. --- ./tclUnixStr.c    Fri Nov  3 10:59:34 1995
  373. ***************
  374. *** 13,19 ****
  375.    */
  376.   
  377.   #ifndef lint
  378. ! static char sccsid[] = "@(#) tclUnixStr.c 1.24 95/06/29 08:21:25";
  379.   #endif /* not lint */
  380.   
  381.   #include "tclInt.h"
  382. --- 13,19 ----
  383.    */
  384.   
  385.   #ifndef lint
  386. ! static char sccsid[] = "@(#) tclUnixStr.c 1.25 95/11/03 10:59:35";
  387.   #endif /* not lint */
  388.   
  389.   #include "tclInt.h"
  390. ***************
  391. *** 215,221 ****
  392.   #ifdef ELNRNG
  393.       case ELNRNG: return "ELNRNG";
  394.   #endif
  395. ! #ifdef ELOOP
  396.       case ELOOP: return "ELOOP";
  397.   #endif
  398.   #ifdef EMFILE
  399. --- 215,221 ----
  400.   #ifdef ELNRNG
  401.       case ELNRNG: return "ELNRNG";
  402.   #endif
  403. ! #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT))
  404.       case ELOOP: return "ELOOP";
  405.   #endif
  406.   #ifdef EMFILE
  407. *** ../tcl7.4p2/./tclUnixUtil.c    Mon Aug 28 08:57:36 1995
  408. --- ./tclUnixUtil.c    Mon Nov 13 14:17:46 1995
  409. ***************
  410. *** 16,22 ****
  411.    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  412.    */
  413.   
  414. ! static char sccsid[] = "@(#) tclUnixUtil.c 1.57 95/08/28 08:57:37";
  415.   
  416.   #include "tclInt.h"
  417.   #include "tclPort.h"
  418. --- 16,22 ----
  419.    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  420.    */
  421.   
  422. ! static char sccsid[] = "@(#) tclUnixUtil.c 1.58 95/11/13 14:17:50";
  423.   
  424.   #include "tclInt.h"
  425.   #include "tclPort.h"
  426. ***************
  427. *** 218,224 ****
  428.       int status, result;
  429.   
  430.       for (detPtr = detList, prevPtr = NULL; detPtr != NULL; ) {
  431. !     result = waitpid(detPtr->pid, &status, WNOHANG);
  432.       if ((result == 0) || ((result == -1) && (errno != ECHILD))) {
  433.           prevPtr = detPtr;
  434.           detPtr = detPtr->nextPtr;
  435. --- 218,224 ----
  436.       int status, result;
  437.   
  438.       for (detPtr = detList, prevPtr = NULL; detPtr != NULL; ) {
  439. !     result = (int) waitpid((pid_t) detPtr->pid, &status, WNOHANG);
  440.       if ((result == 0) || ((result == -1) && (errno != ECHILD))) {
  441.           prevPtr = detPtr;
  442.           detPtr = detPtr->nextPtr;
  443. ***************
  444. *** 1427,1433 ****
  445.   {
  446.       int result;
  447.       while (1) {
  448. !     result = waitpid(pid, statPtr, options);
  449.       if ((result != -1) || (errno != EINTR)) {
  450.           return result;
  451.       }
  452. --- 1427,1433 ----
  453.   {
  454.       int result;
  455.       while (1) {
  456. !     result = (int) waitpid((pid_t) pid, statPtr, options);
  457.       if ((result != -1) || (errno != EINTR)) {
  458.           return result;
  459.       }
  460. *** ../tcl7.4p2/./changes    Mon Sep 18 11:04:09 1995
  461. --- ./changes    Mon Nov 27 08:57:58 1995
  462. ***************
  463. *** 1,6 ****
  464.   Recent user-visible changes to Tcl:
  465.   
  466. ! sccsid = @(#) changes 1.16 95/09/18 11:04:07
  467.   
  468.   1. No more [command1] [command2] construct for grouping multiple
  469.   commands on a single command line.
  470. --- 1,6 ----
  471.   Recent user-visible changes to Tcl:
  472.   
  473. ! sccsid = @(#) changes 1.17 95/11/27 08:58:02
  474.   
  475.   1. No more [command1] [command2] construct for grouping multiple
  476.   commands on a single command line.
  477. ***************
  478. *** 1245,1251 ****
  479.   
  480.   8/4/95 (bug fix) C-level trace callbacks for variables were sometimes
  481.   receiving the PART1_NOT_PARSED flag, which could cause errors in
  482. ! subsequent Tcl library calls using the flags.
  483.   
  484.   8/4/95 (bug fix) Calls to toupper and tolower weren't using the
  485.   UCHAR macros, which caused trouble in non-U.S. locales. (JO)
  486. --- 1245,1251 ----
  487.   
  488.   8/4/95 (bug fix) C-level trace callbacks for variables were sometimes
  489.   receiving the PART1_NOT_PARSED flag, which could cause errors in
  490. ! subsequent Tcl library calls using the flags. (JO)
  491.   
  492.   8/4/95 (bug fix) Calls to toupper and tolower weren't using the
  493.   UCHAR macros, which caused trouble in non-U.S. locales. (JO)
  494. ***************
  495. *** 1252,1260 ****
  496.   
  497.   8/25/95 (bug fix) Undid change from 7/19, so that commands can stay
  498.   around while their deletion callbacks execute.  Added lots of code to
  499. ! handle all of the reentrancy problems that this opens up.
  500.   
  501.   8/28/95 (bug fix) Exec wasn't handling bad user names properly, as
  502. ! in "exec ~bogus_user/foo".
  503.   
  504.   ----------------- Released patch 7.4p2, 9/19/95 -----------------------
  505. --- 1252,1273 ----
  506.   
  507.   8/25/95 (bug fix) Undid change from 7/19, so that commands can stay
  508.   around while their deletion callbacks execute.  Added lots of code to
  509. ! handle all of the reentrancy problems that this opens up. (JO)
  510.   
  511.   8/28/95 (bug fix) Exec wasn't handling bad user names properly, as
  512. ! in "exec ~bogus_user/foo". (JO)
  513.   
  514.   ----------------- Released patch 7.4p2, 9/19/95 -----------------------
  515. + 9/27/95 (bug fix) The "format" command didn't check for huge or negative
  516. + width specifiers, which could cause core dumps. (JO)
  517. + 9/27/95 (bug fix) Core dumps could occur if an interactive command typed
  518. + to tclsh returned a very long result for tclsh to print out.  The bug is
  519. + actually in printf (in Solaris 2.3 and 2.4, at least);  switched to use
  520. + puts instead.  (JO)
  521. + 10/1/95 (bug fix) "exec" command wasn't always generating the
  522. + "child process exited abnormally" message when it should have.  (JO)
  523. + ----------------- Released patch 7.4p3, 12/28/95 -----------------------
  524. *** ../tcl7.4p2/./tests/lsort.test    Mon Jun  5 17:00:02 1995
  525. --- ./tests/lsort.test    Mon Oct 30 08:03:20 1995
  526. ***************
  527. *** 10,16 ****
  528.   # See the file "license.terms" for information on usage and redistribution
  529.   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  530.   #
  531. ! # @(#) lsort.test 1.6 95/06/05 17:00:02
  532.   
  533.   if {[string compare test [info procs test]] == 1} then {source defs}
  534.   
  535. --- 10,16 ----
  536.   # See the file "license.terms" for information on usage and redistribution
  537.   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  538.   #
  539. ! # @(#) lsort.test 1.7 95/10/30 08:03:22
  540.   
  541.   if {[string compare test [info procs test]] == 1} then {source defs}
  542.   
  543. ***************
  544. *** 122,134 ****
  545.   } {1 {bad switch "-in": must be -ascii, -integer, -real, -increasing -decreasing, or -command}}
  546.   test lsort-5.5 {lsort errors: disallow recursion} {
  547.       proc x args {lsort {a b c}}
  548. !     list [catch {lsort -command x {3 7}} msg] $msg $errorInfo
  549. ! } {1 {can't invoke "lsort" recursively} {can't invoke "lsort" recursively
  550. !     while executing
  551. ! "lsort {a b c}"
  552. !     (procedure "x" line 1)
  553. !     invoked from within
  554. ! "x 3 7"
  555. !     (user-defined comparison command)
  556. !     invoked from within
  557. ! "lsort -command x {3 7}"}}
  558. --- 122,126 ----
  559.   } {1 {bad switch "-in": must be -ascii, -integer, -real, -increasing -decreasing, or -command}}
  560.   test lsort-5.5 {lsort errors: disallow recursion} {
  561.       proc x args {lsort {a b c}}
  562. !     list [catch {lsort -command x {3 7}} msg] $msg
  563. ! } {1 {can't invoke "lsort" recursively}}
  564.